import { ZFormItemSchema } from "@/components/Form/typings";
import { ZTableColumn } from "@/components/Table/typings";

export const settingSchemas = (): ZFormItemSchema[] => [
  {
    label: "文本预处理(同时对seed和similarity文本)",
    path: "method",
    component: "ZCheckboxGroup",
    componentProps: {
      options: [
        { label: "空格过滤", value: 0 },
        { label: "花体归一", value: 1 },
        { label: "emoji过滤", value: 2 },
        { label: "大小写归一", value: 3 },
      ],
    },
  },
];

export const getSchemas = (): ZFormItemSchema[] => [
  {
    label: "种子文本输入方式",
    path: "method",
    component: "ZRadioGroup",
    componentProps: {
      options: [
        { label: "词表", value: 1 },
        { label: "文件上传", value: 0 },
      ],
    },
    description: "默认的描述说明信息",
    descriptionTriggerIcon: "QuestionIcon",
  },
  {
    label: "词表",
    path: "table",
    component: "NSelect",
    componentProps: {
      options: [
        { label: "112", value: 112 },
        { label: "2043", value: 2043 },
      ],
    },
  },
  {
    label: "相似度阈值（选填）",
    path: "threshold",
    component: "NInput",
    componentProps: {
      placeholder: "输入-1到1，接受两位小数",
    },
  },
];

export const getColumns = (): ZTableColumn[] => [
  {
    title: "任务ID",
    key: "id",
  },
  {
    title: "相似度阈值",
    key: "config_name",
  },
  {
    title: "任务状态",
    key: "biz_line",
  },
  {
    title: "提交人",
    key: "creator",
  },
  {
    title: "打分时间",
    key: "create_time",
  },
];

export const getSearchSchemas = (): ZFormItemSchema[] => [
  {
    label: "任务ID",
    path: "config_name",
    span: 8,
  },
  {
    label: "我的任务",
    path: "my_task",
    span: 8,
    component: "NCheckbox",
  },
];
